package com.yzh.array02;

import java.util.Arrays;

/**
 * @author 于振晗
 * @title: Test01
 * @description: TODO 冒泡排序
 * @date 2020年08月18日
 * @path com.yzh.array02;
 */
public class Test01 {
    public static void main(String[] args) {
        int [] arrs = {75,87,56,45,89,100,76,34,97};
        for (int i = 0; i < arrs.length; i++) {
            for (int j = 0; j < arrs.length-1-i; j++) {
                if(arrs[j]>arrs[j+1]){
                    int tem = arrs[j];
                    arrs[j] = arrs[j+1];
                    arrs[j+1] = tem;
                }
            }
        }
        System.out.println(Arrays.toString(arrs));
    }
}
